<?php
// +----------------------------------------------------------------------
// | 青航系统 [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2023-永久 https://www.feifeiyu.club/ All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 青航-不吃芒果 <1716892803@qq.com>
// +----------------------------------------------------------------------
namespace app\admin\model;
use think\Model;


class Upload extends Model{
    
    
    
    // 这里是用于后台操作的记录库
    public static function insert_add($info,$savename) {
    	$data['module'] = app('http')->getName();
    	$data['originname'] = str_replace("\\",'/',$savename);
    	$data['filename'] = $info->hash('sha1');
    	$data['filesize'] = $info->getSize();
    	$data['arrtype'] = arrtype($info->getOriginalExtension());
    	$data['userid'] = Session('adminid');
    	$data['username'] = Session('adminname');
    	$data['uploadtime'] = time();
    	$data['uploadip'] = getip();
    	D('attachment')->insert($data);
    }
    
    
    
    
}